package com.mycompany.app.testsuite.scheduler;



import com.mycompany.app.common.scheduler.dao.IDaemonJobDao;
import com.mycompany.app.common.scheduler.dao.IDaemonJobTriggerDao;
import com.mycompany.app.common.scheduler.model.DaemonJob;
import com.mycompany.app.testsuite.BaseTestUtils;
import com.mycompany.app.util.SpringUtils;

public class DAOTest extends BaseTestUtils {

    public static void main(String[] args) {

        IDaemonJobDao dao1 = (IDaemonJobDao) SpringUtils
                .getApplicationContext().getBean("daemonJobDao");
        IDaemonJobTriggerDao dao2 = (IDaemonJobTriggerDao) SpringUtils
                .getApplicationContext().getBean("daemonJobTriggerDao");

//         DaemonJob job=new DaemonJob();
//         job.setName("system101");

         DaemonJob job = dao1.get(1L);
         System.out.println(job);
//         DaemonJobTrigger s = new DaemonJobTrigger();
//         s.setDescription("schedule 2");
//         s.setDaemonJob(new DaemonJob(36L));
////         job.addSchedule(s);

//        DaemonJobSchedule s = dao2.get(19L);
//      DaemonJob job=new DaemonJob();
//         job.setName("guoxu");
//         s.setDaemonJob(job);
//         System.out.println(dao2.save(s));

//         System.out.println(dao1.save(job));
//         System.out.println(dao2.save(s));

    }

}
